package com.party.core.model.commune;

import com.party.core.model.BaseModel;

import java.util.Objects;

/**
 * @program: party
 * @description: 用户积分
 * @author: Hua Qunhao
 * @create: 2019-08-12 14:11
 **/
public class CUserIntegral extends BaseModel {
    //'积分项id'
    private String integralItemId;
    //机构用户关系表id
    private String pmId;
    //积分类型id
    private String integralTypeId;
    //积分项名称
    private String integralItemName;
    //活动id
    private String activityId;
    //人员类型(1/已签到，0/全部)
    private Integer memberType;

    //推荐邀请表id
    private String recommendId;

    // 机构id
    private String partnerId;

    // 用户id
    private String memberId;

    public CUserIntegral() {
    }

    public CUserIntegral(String integralItemId, String pmId, String integralTypeId) {
        this.integralItemId = integralItemId;
        this.pmId = pmId;
        this.integralTypeId = integralTypeId;
    }

    public CUserIntegral(String integralItemId, String integralTypeId, String partnerId, String memberId) {
        this.integralItemId = integralItemId;
        this.integralTypeId = integralTypeId;
        this.partnerId = partnerId;
        this.memberId = memberId;
    }

    public String getIntegralItemId() {
        return integralItemId;
    }

    public void setIntegralItemId(String integralItemId) {
        this.integralItemId = integralItemId;
    }

    public String getPmId() {
        return pmId;
    }

    public void setPmId(String pmId) {
        this.pmId = pmId;
    }

    public String getIntegralTypeId() {
        return integralTypeId;
    }

    public void setIntegralTypeId(String integralTypeId) {
        this.integralTypeId = integralTypeId;
    }

    public String getIntegralItemName() {
        return integralItemName;
    }

    public void setIntegralItemName(String integralItemName) {
        this.integralItemName = integralItemName;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public Integer getMemberType() {
        return memberType;
    }

    public void setMemberType(Integer memberType) {
        this.memberType = memberType;
    }

    public String getRecommendId() {
        return recommendId;
    }

    public void setRecommendId(String recommendId) {
        this.recommendId = recommendId;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CUserIntegral that = (CUserIntegral) o;
        return Objects.equals(integralItemId, that.integralItemId) &&
                Objects.equals(pmId, that.pmId) &&
                Objects.equals(integralTypeId, that.integralTypeId) &&
                Objects.equals(integralItemName, that.integralItemName) &&
                Objects.equals(activityId, that.activityId) &&
                Objects.equals(memberType, that.memberType) &&
                Objects.equals(recommendId, that.recommendId) &&
                Objects.equals(partnerId, that.partnerId) &&
                Objects.equals(memberId, that.memberId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), integralItemId, pmId, integralTypeId, integralItemName, activityId, memberType, recommendId, partnerId, memberId);
    }

    @Override
    public String toString() {
        return "CUserIntegral{" +
                "integralItemId='" + integralItemId + '\'' +
                ", pmId='" + pmId + '\'' +
                ", integralTypeId='" + integralTypeId + '\'' +
                ", integralItemName='" + integralItemName + '\'' +
                ", activityId='" + activityId + '\'' +
                ", memberType=" + memberType +
                ", recommendId='" + recommendId + '\'' +
                ", partnerId='" + partnerId + '\'' +
                ", memberId='" + memberId + '\'' +
                '}';
    }
}
